package com.geely.design.principle.interfacesegregation;

public class test {
    public static void main(String[] args) {
        IEatAnimalAction iEatAnimalAction  = new Cat();
        name(iEatAnimalAction);
    }

    public static void name(IEatAnimalAction iEatAnimalAction ){

        if (iEatAnimalAction instanceof Dog){
            new Dog().eat();
        }
        else {

        }
    }
}
